package org.fuys.coder.domain.substance.repository;

import org.fuys.coder.infrastructure.model.dto.SubstanceAuthorDTO;
import org.fuys.coder.infrastructure.model.dto.SubstanceDTO;
import org.fuys.coder.infrastructure.model.dto.SubstanceDataStatusDTO;
import org.fuys.coder.domain.audit.model.vo.AuditResultTypeVO;
import org.fuys.coder.common.entity.PageDTO;
import org.fuys.coder.domain.substance.model.req.admin.SubstancePublishReq;
import org.fuys.coder.domain.substance.model.req.operation.SubstanceDataStatusSelectReq;
import org.fuys.coder.domain.substance.model.vo.SubstanceSupplyVO;
import org.fuys.coder.domain.substance.model.vo.SubstanceVO;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.substance.repository
 * @className: ISubstanceRepository
 * @author: WangJing
 * @description: 内容仓储接口
 * @date: 2024/6/25 18:19
 * @version: 1.0
 */
public interface ISubstanceRepository {
    public List<SubstanceDTO> getSubstanceByCategories(List<Integer> categoryList, int curPage,int substanceSize);


    void thumbSubstance(Long substanceId,boolean flag);

    void favoritesSubstance(Long substanceId, boolean flag);

    Long addSubstance(SubstancePublishReq req);

    void setSubstanceStatusById(Long substanceId, AuditResultTypeVO auditResultTypeVO);

    SubstanceSupplyVO getSubstanceSupply(Long substanceId);

    SubstanceAuthorDTO getSubstanceAndAuthorIntro(Long substanceId);

    List<SubstanceDTO> getSubstanceAfterTime(Date dateBeforeCur, Integer hotSelectNum);

    List<SubstanceVO> getAuthorSubstancesByOpenFlag(Integer userId, PageDTO pageDTO, boolean showNotOpen);

    SubstanceDataStatusDTO getSubstanceDataStatus(SubstanceDataStatusSelectReq req);

    List<SubstanceDTO> getSubstanceByName(PageDTO pageDTO, String keywords);

    SubstanceDTO getSubstanceById(Long id);

    void modifySubstanceStatusById(Long id, Integer status, Integer type);

    List<SubstanceDTO> getSubstances(List<Long> id);

    Set<SubstanceVO> getCacheSubstance(String key,Integer count);
}
